Skip to content

feat: add configurable filesystem crash durability - #37

Merged
cervantesh merged 5 commits into
mainfrom
issue-35-crash-durability
Jul 16, 2026
Merged

feat: add configurable filesystem crash durability#37
cervantesh merged 5 commits into
mainfrom
issue-35-crash-durability

Conversation

@cervantesh

@cervantesh cervantesh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add ADR 0001 defining filesystem crash-durability levels, defaults, ordering, capability degradation, post-rename failure semantics, and created-directory scope
  • add selectable none, file, and file-and-parent-directory behavior through FilesystemPiClientConfig while preserving file as the default
  • apply preserved mode before the final temporary-file sync and capability-detect direct-parent sync with degrade/strict policies
  • retain the direct parent before rename and verify its followed target around rename so path replacement/retargeting cannot redirect sync or produce a false durability success
  • report pre/post-commit durability failures through FilesystemDurabilityError.destinationVisible
  • add deterministic operation/failure/race seams, cross-platform tests, end-to-end durability benchmarks, generated dist, and recovery/security documentation

Validation

  • npm run check
  • npm run build
  • npm test — 41 tests, 38 passed, 3 Windows capability skips, 0 failed
  • npm run test:coverage — 88.06% lines, 86.04% branches, 87.50% functions
  • npm run benchmark
  • npm run verify:package — 29 packed files verified
  • npm audit --audit-level=high — 0 vulnerabilities
  • git diff --check
  • local pi-lens safe analysis — 0 blocking diagnostics
  • hosted Ubuntu Node 22/24, Windows Node 22, macOS Node 22, and CodeQL matrix

Review follow-up

  • 24a646e: pin the direct parent with a pre-rename handle
  • 45f4a3a: verify retained parent identity before/after rename and fail unconfirmed on mismatch
  • b8d133a: verify followed parent target so stable symlinked parents work while retargeting is detected
  • all Codex P2 threads answered and resolved

Closes #35

@cervantesh

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14fdff72c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/filesystem-client.ts Outdated
@cervantesh

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24a646e67b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/filesystem-client.ts Outdated
@cervantesh

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45f4a3aaba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/filesystem-client.ts
@cervantesh

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: b8d133a813

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cervantesh
cervantesh merged commit 63d60de into main Jul 16, 2026
6 checks passed
@cervantesh
cervantesh deleted the issue-35-crash-durability branch July 16, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add crash-durability guarantees for atomic filesystem edits

1 participant